package com.xw.dao;

import com.xw.model.VideosItem;
import com.xw.util.MyMapper;
import com.xw.vo.UserInfoVo;
import com.xw.vo.VideosItemVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface VideosItemMapper extends MyMapper<VideosItem> {
    Integer saveBatch(@Param("list") List<VideosItem> videosItemList);

    List<VideosItemVo> findByWhere(@Param("videoId") String videoId,@Param("videoItemName") String videoItemName,@Param("videoStatus") Integer videoStatus);

    int isMyVideos(@Param("userId") String userId,@Param("videoItemId") String videoItemId);

    List<VideosItem> selectVideosItemList(@Param("list") List<String> videosItemIds);

    List<VideosItem> selectVideoItemInfo(@Param("videoItem")VideosItemVo videosItem);

    Integer selectVideoItemInfoCount(@Param("videoItem")VideosItemVo videosItem);

    Integer updateTeacherNameByUserId(@Param("user") UserInfoVo userId);

    Integer updateRelationVideosId(@Param("videosId") String videosId,@Param("list") List<VideosItem> videoItemIdList);

    Integer downVideoItemByUserId(@Param("userId") String userId);

    Integer relationVideosId(@Param("videosId") String videosId,@Param("list") List<String> videoItemIdList);

    Integer updateVideosItem(@Param("videoId") String videoId,@Param("list") List<VideosItem> list);

    List<VideosItemVo> findAllByVideoIdJson(@Param("videoId") String videoId,@Param("videoItemName") String videoItemName,@Param("videoStatus") Integer videoStatus);

    List<VideosItem> getPassVideoItemNoVideos(@Param("userId") String userId);
}